package com.hdsx.restful.ygzt.hyz.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hdsx.ao.base.BaseOpearte;
import com.hdsx.restful.ygzt.hyz.bean.Hyz;
import com.hdsx.restful.ygzt.hyz.mapper.HyzMapper;
import com.hdsx.restful.ygzt.hyz.service.HyzService;

@Service
public class HyzServiceImpl extends BaseOpearte<Hyz> implements HyzService {
	public HyzServiceImpl() {
		super("GIS_HYZD");
	}

	@Resource(name="hyzMapper")
	private HyzMapper mapper;

	@Override
	public int queryCount(String xzqhbm, String hyzmc, String lxdh) {
		Map<String,Object> parameter=new HashMap<String,Object>();
		parameter.put("xzqhbm", xzqhbm);
		parameter.put("name", hyzmc);
		parameter.put("lxdh", lxdh);
		return mapper.queryCount(parameter);
	}

	@Override
	public List<Hyz> queryList(String xzqhbm, String hyzmc, String lxdh, int begin, int end) {
		Map<String,Object> parameter=new HashMap<String,Object>();
		parameter.put("xzqhbm", xzqhbm);
		parameter.put("name", hyzmc);
		parameter.put("lxdh", lxdh);
		parameter.put("begin", begin);
		parameter.put("end", end);
		List<Hyz> lists=mapper.queryList(parameter);
		return lists;
	}

	@Override
	public Hyz queryById(String id) {
		return mapper.selectById(id);
	}
	@Override
	public List<String> selectName(String name){
		return mapper.selectName(name);
	}
}
